<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>目录结构 | 皮卡车</title>
    <meta name="description" content="皮卡车的文档, vuepress 文档">
    <meta name="generator" content="VuePress 1.3.1">
    <link rel="apple-touch-icon" href="/apple-touch-icon.png">
  <link rel="icon" href="/favicon.ico">
  <link rel="manifest" href="/manifest.json">
  <meta name="theme-color" content="#ffffff">
  <meta name="google-site-verification" content="Ld_AEWr30siza2LmmZ12csitRGsSj9gqqEAch0UXkTc">
    
    <link rel="preload" href="/assets/css/0.styles.1a6a4f51.css" as="style"><link rel="preload" href="/assets/js/app.1f0f93c9.js" as="script"><link rel="preload" href="/assets/js/2.f28f3227.js" as="script"><link rel="preload" href="/assets/js/103.872c594c.js" as="script"><link rel="preload" href="/assets/js/3.a7eaa85f.js" as="script"><link rel="prefetch" href="/assets/js/10.7b76d38f.js"><link rel="prefetch" href="/assets/js/100.0d62a3f6.js"><link rel="prefetch" href="/assets/js/101.4916ac0c.js"><link rel="prefetch" href="/assets/js/102.0ee21f66.js"><link rel="prefetch" href="/assets/js/104.0bff815e.js"><link rel="prefetch" href="/assets/js/105.46330c43.js"><link rel="prefetch" href="/assets/js/106.4ad211ca.js"><link rel="prefetch" href="/assets/js/107.d9011871.js"><link rel="prefetch" href="/assets/js/108.bab8ed0e.js"><link rel="prefetch" href="/assets/js/109.b7e4a790.js"><link rel="prefetch" href="/assets/js/11.518e0dbb.js"><link rel="prefetch" href="/assets/js/110.1eb492e8.js"><link rel="prefetch" href="/assets/js/111.ee6a2e31.js"><link rel="prefetch" href="/assets/js/112.05d655c6.js"><link rel="prefetch" href="/assets/js/113.0a4cf8f0.js"><link rel="prefetch" href="/assets/js/114.ef783947.js"><link rel="prefetch" href="/assets/js/115.11bbdb9c.js"><link rel="prefetch" href="/assets/js/116.5646126d.js"><link rel="prefetch" href="/assets/js/117.854d26bf.js"><link rel="prefetch" href="/assets/js/118.1e514b13.js"><link rel="prefetch" href="/assets/js/119.aa944f45.js"><link rel="prefetch" href="/assets/js/12.511e3547.js"><link rel="prefetch" href="/assets/js/120.1c6f450c.js"><link rel="prefetch" href="/assets/js/121.44f16ee6.js"><link rel="prefetch" href="/assets/js/122.f877b8e8.js"><link rel="prefetch" href="/assets/js/123.0563fdd5.js"><link rel="prefetch" href="/assets/js/124.4cd97316.js"><link rel="prefetch" href="/assets/js/125.a502f4ee.js"><link rel="prefetch" href="/assets/js/126.c7e94093.js"><link rel="prefetch" href="/assets/js/127.bd8aed7f.js"><link rel="prefetch" href="/assets/js/128.66063cc3.js"><link rel="prefetch" href="/assets/js/129.21bb1073.js"><link rel="prefetch" href="/assets/js/13.9e5bee4e.js"><link rel="prefetch" href="/assets/js/130.c8edfccb.js"><link rel="prefetch" href="/assets/js/131.7a1f29be.js"><link rel="prefetch" href="/assets/js/132.f589fc06.js"><link rel="prefetch" href="/assets/js/133.55ac5c9a.js"><link rel="prefetch" href="/assets/js/134.eeab127b.js"><link rel="prefetch" href="/assets/js/135.5a1571dd.js"><link rel="prefetch" href="/assets/js/136.b72b4d1c.js"><link rel="prefetch" href="/assets/js/137.678e022a.js"><link rel="prefetch" href="/assets/js/138.ba4108fa.js"><link rel="prefetch" href="/assets/js/139.0b02b599.js"><link rel="prefetch" href="/assets/js/14.b9ec07e6.js"><link rel="prefetch" href="/assets/js/140.690e4e4c.js"><link rel="prefetch" href="/assets/js/141.709da4ed.js"><link rel="prefetch" href="/assets/js/142.f2de76c0.js"><link rel="prefetch" href="/assets/js/143.4dcb17f0.js"><link rel="prefetch" href="/assets/js/144.730ef429.js"><link rel="prefetch" href="/assets/js/145.d881c754.js"><link rel="prefetch" href="/assets/js/146.f3379a41.js"><link rel="prefetch" href="/assets/js/147.eeb9ca6f.js"><link rel="prefetch" href="/assets/js/148.bb6020cd.js"><link rel="prefetch" href="/assets/js/149.1d34dea6.js"><link rel="prefetch" href="/assets/js/15.d0fa1a9d.js"><link rel="prefetch" href="/assets/js/150.599238ba.js"><link rel="prefetch" href="/assets/js/151.9655268f.js"><link rel="prefetch" href="/assets/js/152.1f843fa4.js"><link rel="prefetch" href="/assets/js/153.7af45ca6.js"><link rel="prefetch" href="/assets/js/154.eff93a56.js"><link rel="prefetch" href="/assets/js/155.ff07fba4.js"><link rel="prefetch" href="/assets/js/156.1b1814b7.js"><link rel="prefetch" href="/assets/js/157.8ac4c21b.js"><link rel="prefetch" href="/assets/js/158.aa8a0124.js"><link rel="prefetch" href="/assets/js/159.d61fdb37.js"><link rel="prefetch" href="/assets/js/16.ccd2bd60.js"><link rel="prefetch" href="/assets/js/17.ddc8fde4.js"><link rel="prefetch" href="/assets/js/18.a06e60cc.js"><link rel="prefetch" href="/assets/js/19.64b3dec9.js"><link rel="prefetch" href="/assets/js/20.3615e182.js"><link rel="prefetch" href="/assets/js/21.0c654d53.js"><link rel="prefetch" href="/assets/js/22.720aac8f.js"><link rel="prefetch" href="/assets/js/23.0dc53b91.js"><link rel="prefetch" href="/assets/js/24.d4b75b0e.js"><link rel="prefetch" href="/assets/js/25.9120702e.js"><link rel="prefetch" href="/assets/js/26.b24d89e2.js"><link rel="prefetch" href="/assets/js/27.55df94ab.js"><link rel="prefetch" href="/assets/js/28.250c68a5.js"><link rel="prefetch" href="/assets/js/29.75a3c8f3.js"><link rel="prefetch" href="/assets/js/30.8cdc2fcd.js"><link rel="prefetch" href="/assets/js/31.45303d68.js"><link rel="prefetch" href="/assets/js/32.f4225739.js"><link rel="prefetch" href="/assets/js/33.15b21267.js"><link rel="prefetch" href="/assets/js/34.5baca30b.js"><link rel="prefetch" href="/assets/js/35.5d9dfab1.js"><link rel="prefetch" href="/assets/js/36.981eadca.js"><link rel="prefetch" href="/assets/js/37.cead7f6b.js"><link rel="prefetch" href="/assets/js/38.ee6bcaf1.js"><link rel="prefetch" href="/assets/js/39.e7579788.js"><link rel="prefetch" href="/assets/js/4.494c614b.js"><link rel="prefetch" href="/assets/js/40.01d2b30b.js"><link rel="prefetch" href="/assets/js/41.19cf06ce.js"><link rel="prefetch" href="/assets/js/42.15941cde.js"><link rel="prefetch" href="/assets/js/43.66adb73c.js"><link rel="prefetch" href="/assets/js/44.8d99ed62.js"><link rel="prefetch" href="/assets/js/45.12ea9159.js"><link rel="prefetch" href="/assets/js/46.644efa88.js"><link rel="prefetch" href="/assets/js/47.531131c7.js"><link rel="prefetch" href="/assets/js/48.b214f000.js"><link rel="prefetch" href="/assets/js/49.e42d4b72.js"><link rel="prefetch" href="/assets/js/5.7e277dc8.js"><link rel="prefetch" href="/assets/js/50.de0aa85c.js"><link rel="prefetch" href="/assets/js/51.8be2974c.js"><link rel="prefetch" href="/assets/js/52.cc067888.js"><link rel="prefetch" href="/assets/js/53.4ceb2c6b.js"><link rel="prefetch" href="/assets/js/54.b2647058.js"><link rel="prefetch" href="/assets/js/55.dc3df953.js"><link rel="prefetch" href="/assets/js/56.921a6934.js"><link rel="prefetch" href="/assets/js/57.1e24b1fd.js"><link rel="prefetch" href="/assets/js/58.f4e8ebac.js"><link rel="prefetch" href="/assets/js/59.17ab117b.js"><link rel="prefetch" href="/assets/js/6.4014218f.js"><link rel="prefetch" href="/assets/js/60.352cea9b.js"><link rel="prefetch" href="/assets/js/61.77289388.js"><link rel="prefetch" href="/assets/js/62.ec0ed919.js"><link rel="prefetch" href="/assets/js/63.c75dcb25.js"><link rel="prefetch" href="/assets/js/64.59d15a75.js"><link rel="prefetch" href="/assets/js/65.7e5a14bb.js"><link rel="prefetch" href="/assets/js/66.4e770ba1.js"><link rel="prefetch" href="/assets/js/67.0742f21a.js"><link rel="prefetch" href="/assets/js/68.a6ed34fd.js"><link rel="prefetch" href="/assets/js/69.48c9a47f.js"><link rel="prefetch" href="/assets/js/7.c5ecd7d3.js"><link rel="prefetch" href="/assets/js/70.eb477192.js"><link rel="prefetch" href="/assets/js/71.1be57009.js"><link rel="prefetch" href="/assets/js/72.6859561c.js"><link rel="prefetch" href="/assets/js/73.aae65018.js"><link rel="prefetch" href="/assets/js/74.59d76d34.js"><link rel="prefetch" href="/assets/js/75.04e23427.js"><link rel="prefetch" href="/assets/js/76.74d6eb6a.js"><link rel="prefetch" href="/assets/js/77.fba76057.js"><link rel="prefetch" href="/assets/js/78.0da94b25.js"><link rel="prefetch" href="/assets/js/79.14676976.js"><link rel="prefetch" href="/assets/js/8.08c85334.js"><link rel="prefetch" href="/assets/js/80.7494721f.js"><link rel="prefetch" href="/assets/js/81.f04f6229.js"><link rel="prefetch" href="/assets/js/82.e4c6f74b.js"><link rel="prefetch" href="/assets/js/83.81ad8dbf.js"><link rel="prefetch" href="/assets/js/84.d28e4a3d.js"><link rel="prefetch" href="/assets/js/85.d99fa7fa.js"><link rel="prefetch" href="/assets/js/86.597ecadb.js"><link rel="prefetch" href="/assets/js/87.e6d21734.js"><link rel="prefetch" href="/assets/js/88.b43a52d4.js"><link rel="prefetch" href="/assets/js/89.a5ba287d.js"><link rel="prefetch" href="/assets/js/9.658cd6b3.js"><link rel="prefetch" href="/assets/js/90.c253df12.js"><link rel="prefetch" href="/assets/js/91.8946a93d.js"><link rel="prefetch" href="/assets/js/92.8b8f1ae0.js"><link rel="prefetch" href="/assets/js/93.aa73c784.js"><link rel="prefetch" href="/assets/js/94.9326bcc7.js"><link rel="prefetch" href="/assets/js/95.46b64b79.js"><link rel="prefetch" href="/assets/js/96.61a9b0b9.js"><link rel="prefetch" href="/assets/js/97.65a03aad.js"><link rel="prefetch" href="/assets/js/98.7aa56ed0.js"><link rel="prefetch" href="/assets/js/99.a652c8d5.js">
    <link rel="stylesheet" href="/assets/css/0.styles.1a6a4f51.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">皮卡车</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link">
  Home
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
  Guide
</a></div><div class="nav-item"><a href="/computer/" class="nav-link">
  计算机
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统" class="dropdown-title"><span class="title">系统</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/os/linux/" class="nav-link router-link-active">
  Linux
</a></li><li class="dropdown-item"><!----> <a href="/os/manjaro/" class="nav-link">
  Manjaro
</a></li><li class="dropdown-item"><!----> <a href="/os/ubuntu/" class="nav-link">
  Ubuntu
</a></li><li class="dropdown-item"><!----> <a href="/os/centos/" class="nav-link">
  CentOS
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端" class="dropdown-title"><span class="title">前端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/frontend/javascript/" class="nav-link">
  JavaScript
</a></li><li class="dropdown-item"><!----> <a href="https://css.shanyuhai.top/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  CSS
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="/frontend/webpack/" class="nav-link">
  Webpack
</a></li><li class="dropdown-item"><!----> <a href="/frontend/d3js/" class="nav-link">
  D3
</a></li><li class="dropdown-item"><!----> <a href="/frontend/utils/" class="nav-link">
  Utils
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="后端" class="dropdown-title"><span class="title">后端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/backend/nodejs/" class="nav-link">
  Nodejs
</a></li><li class="dropdown-item"><!----> <a href="/backend/koa/" class="nav-link">
  Koa
</a></li><li class="dropdown-item"><!----> <a href="/backend/mongodb/" class="nav-link">
  MongoDB
</a></li><li class="dropdown-item"><!----> <a href="/backend/nginx/" class="nav-link">
  Nginx
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="开发工具" class="dropdown-title"><span class="title">开发工具</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/tools/git/" class="nav-link">
  Git
</a></li><li class="dropdown-item"><!----> <a href="/tools/github/" class="nav-link">
  Github
</a></li><li class="dropdown-item"><!----> <a href="/tools/vscode/" class="nav-link">
  VSCode
</a></li><li class="dropdown-item"><!----> <a href="/tools/chrome/" class="nav-link">
  Chrome Developer tools
</a></li><li class="dropdown-item"><!----> <a href="/tools/bookmark-scripts/" class="nav-link">
  Bookmark scripts
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="更多" class="dropdown-title"><span class="title">更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/more/algorithm/" class="nav-link">
  算法
</a></li><li class="dropdown-item"><!----> <a href="/more/interview/" class="nav-link">
  面试题
</a></li><li class="dropdown-item"><!----> <a href="/more/hodgepodge/" class="nav-link">
  大杂烩
</a></li><li class="dropdown-item"><!----> <a href="/more/clean/" class="nav-link">
  风格指南
</a></li><li class="dropdown-item"><!----> <a href="https://v1.vuepress.vuejs.org/zh/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  VuePress1.x 官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link">
  Home
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
  Guide
</a></div><div class="nav-item"><a href="/computer/" class="nav-link">
  计算机
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="系统" class="dropdown-title"><span class="title">系统</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/os/linux/" class="nav-link router-link-active">
  Linux
</a></li><li class="dropdown-item"><!----> <a href="/os/manjaro/" class="nav-link">
  Manjaro
</a></li><li class="dropdown-item"><!----> <a href="/os/ubuntu/" class="nav-link">
  Ubuntu
</a></li><li class="dropdown-item"><!----> <a href="/os/centos/" class="nav-link">
  CentOS
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="前端" class="dropdown-title"><span class="title">前端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/frontend/javascript/" class="nav-link">
  JavaScript
</a></li><li class="dropdown-item"><!----> <a href="https://css.shanyuhai.top/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  CSS
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li><li class="dropdown-item"><!----> <a href="/frontend/webpack/" class="nav-link">
  Webpack
</a></li><li class="dropdown-item"><!----> <a href="/frontend/d3js/" class="nav-link">
  D3
</a></li><li class="dropdown-item"><!----> <a href="/frontend/utils/" class="nav-link">
  Utils
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="后端" class="dropdown-title"><span class="title">后端</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/backend/nodejs/" class="nav-link">
  Nodejs
</a></li><li class="dropdown-item"><!----> <a href="/backend/koa/" class="nav-link">
  Koa
</a></li><li class="dropdown-item"><!----> <a href="/backend/mongodb/" class="nav-link">
  MongoDB
</a></li><li class="dropdown-item"><!----> <a href="/backend/nginx/" class="nav-link">
  Nginx
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="开发工具" class="dropdown-title"><span class="title">开发工具</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/tools/git/" class="nav-link">
  Git
</a></li><li class="dropdown-item"><!----> <a href="/tools/github/" class="nav-link">
  Github
</a></li><li class="dropdown-item"><!----> <a href="/tools/vscode/" class="nav-link">
  VSCode
</a></li><li class="dropdown-item"><!----> <a href="/tools/chrome/" class="nav-link">
  Chrome Developer tools
</a></li><li class="dropdown-item"><!----> <a href="/tools/bookmark-scripts/" class="nav-link">
  Bookmark scripts
</a></li></ul></div></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="更多" class="dropdown-title"><span class="title">更多</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/more/algorithm/" class="nav-link">
  算法
</a></li><li class="dropdown-item"><!----> <a href="/more/interview/" class="nav-link">
  面试题
</a></li><li class="dropdown-item"><!----> <a href="/more/hodgepodge/" class="nav-link">
  大杂烩
</a></li><li class="dropdown-item"><!----> <a href="/more/clean/" class="nav-link">
  风格指南
</a></li><li class="dropdown-item"><!----> <a href="https://v1.vuepress.vuejs.org/zh/" target="_blank" rel="noopener noreferrer" class="nav-link external">
  VuePress1.x 官网
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>LINUX</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/os/linux/" class="sidebar-link">首页</a></li><li><a href="/os/linux/everything-is-a-file.html" class="sidebar-link">一切皆文件</a></li><li><a href="/os/linux/alias.html" class="sidebar-link">别名 alias</a></li><li><a href="/os/linux/ansible.html" class="sidebar-link">分发脚本 ansible</a></li><li><a href="/os/linux/archiving-and-compression.html" class="sidebar-link">归档和压缩</a></li><li><a href="/os/linux/command-options.html" class="sidebar-link">命令选项</a></li><li><a href="/os/linux/command-shortcut.html" class="sidebar-link">命令行快捷键</a></li><li><a href="/os/linux/crontab.html" class="sidebar-link">解放双手计划</a></li><li><a href="/os/linux/detect-your-server.html" class="sidebar-link">检测服务器通达</a></li><li><a href="/os/linux/directory-structure.html" class="active sidebar-link">目录结构</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/os/linux/directory-structure.html#介绍" class="sidebar-link">介绍</a></li><li class="sidebar-sub-header"><a href="/os/linux/directory-structure.html#fhs-规范目录" class="sidebar-link">FHS 规范目录</a></li><li class="sidebar-sub-header"><a href="/os/linux/directory-structure.html#非-fhs" class="sidebar-link">非 FHS</a></li><li class="sidebar-sub-header"><a href="/os/linux/directory-structure.html#硬件设备" class="sidebar-link">硬件设备</a></li></ul></li><li><a href="/os/linux/firewalld.html" class="sidebar-link">防火墙 firewalld</a></li><li><a href="/os/linux/gaudy-and-pragmatical-command.html" class="sidebar-link">花里胡哨且实用的命令</a></li><li><a href="/os/linux/generate-ssh-key.html" class="sidebar-link">创建 SSH Key</a></li><li><a href="/os/linux/grep-sed-awk.html" class="sidebar-link">文本三剑客</a></li><li><a href="/os/linux/how-to-enable-the-hard-disk.html" class="sidebar-link">如何启用硬盘</a></li><li><a href="/os/linux/how-to-install-linux-on-virtualbox.html" class="sidebar-link">虚拟机中安装 Linux</a></li><li><a href="/os/linux/io-redirection.html" class="sidebar-link">输入、输出重定向</a></li><li><a href="/os/linux/login-with-rsa-key.html" class="sidebar-link">使用 RSA 登录服务器</a></li><li><a href="/os/linux/raid.html" class="sidebar-link">磁盘阵列</a></li><li><a href="/os/linux/rsync-and-scp.html" class="sidebar-link">远程同步文件</a></li><li><a href="/os/linux/systemd.html" class="sidebar-link">守护系统 systemd</a></li><li><a href="/os/linux/user.html" class="sidebar-link">用户管理</a></li><li><a href="/os/linux/view-text-context.html" class="sidebar-link">查看文本内容</a></li><li><a href="/os/linux/xargs.html" class="sidebar-link">传参 xargs</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="介绍"><a href="#介绍" class="header-anchor">#</a> 介绍</h2> <p>如果想要了解 Linux，那么你首先需要知道大部分的目录是做什么的，具有什么含义。</p> <p>为了方便管理和维护，Linux 采用了 <a href="https://zh.wikipedia.org/wiki/%E6%96%87%E4%BB%B6%E7%B3%BB%E7%BB%9F%E5%B1%82%E6%AC%A1%E7%BB%93%E6%9E%84%E6%A0%87%E5%87%86" target="_blank" rel="noopener noreferrer">FHS（Filesystem Hierarchy Standard） 标准<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>（文件系统层次结构标准），它规定了根目录下各个目录应该存在哪些类型的文件（目录也是文件）。</p> <p>FHS 认为，Linux 系统的根目录（/）最为重要，没有之一，原因：</p> <ol><li>所有目录都是由根目录衍生出来的;</li> <li>根目录与系统的开机、修复和还原密切相关。</li></ol> <blockquote><p>如果仅仅靠联想，其实还是难以理解其中含义，如果见过真正的<a href="https://www.zhihu.com/question/49073893/answer/114986798" target="_blank" rel="noopener noreferrer">小型机<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>，很多概念就变得容易理解了。</p></blockquote> <h2 id="fhs-规范目录"><a href="#fhs-规范目录" class="header-anchor">#</a> FHS 规范目录</h2> <table><thead><tr><th style="text-align:center;">缩写</th> <th style="text-align:center;">全称</th> <th style="text-align:left;">说明</th></tr></thead> <tbody><tr><td style="text-align:center;">/bin/</td> <td style="text-align:center;">binary</td> <td style="text-align:left;">存放系统命令，普通用户和 root 都可以执行。目前 <code>/bin/</code> 实际上是 <code>/usr/bin/</code> 的软连接。</td></tr> <tr><td style="text-align:center;">/boot/</td> <td style="text-align:center;">boot</td> <td style="text-align:left;">系统启动目录，保存与系统启动相关的文件，如内核文件和启动引导程序（grub）文件等。该目录挂载在 <code>/dev/</code> 对应的第一块硬盘下，硬盘名根据<a href="/os/linux/directory-structure.html#硬件设备">硬盘类型</a>来生成。安装系统时，需要为其单独分一个 boot 分区，大小可为 256~1024MB。</td></tr> <tr><td style="text-align:center;">/dev/</td> <td style="text-align:center;">device</td> <td style="text-align:left;">设备文件保存位置。</td></tr> <tr><td style="text-align:center;">/etc/</td> <td style="text-align:center;">etceteras（附加）</td> <td style="text-align:left;">二进制软件包（yum、rpm）等的配置文件路径，例如：<code>/etc/exports</code>、<code>/etc/fstab</code>、<code>/etc/resove.conf</code> 等。</td></tr> <tr><td style="text-align:center;">/etc/opt/</td> <td style="text-align:center;"></td> <td style="text-align:left;"><code>/opt/</code> 的配置文件。</td></tr> <tr><td style="text-align:center;">/etc/X11/</td> <td style="text-align:center;"></td> <td style="text-align:left;">X窗口系统（版本11）的配置文件。</td></tr> <tr><td style="text-align:center;">/etc/sgml/</td> <td style="text-align:center;"></td> <td style="text-align:left;">SGML 的配置文件。</td></tr> <tr><td style="text-align:center;">/etc/xml/</td> <td style="text-align:center;"></td> <td style="text-align:left;">XML 的配置文件。</td></tr> <tr><td style="text-align:center;">/home/</td> <td style="text-align:center;">home</td> <td style="text-align:left;">普通用户的主目录（也称为家目录），用于用户的默认登录和保存数据。</td></tr> <tr><td style="text-align:center;">/lib/</td> <td style="text-align:center;">library</td> <td style="text-align:left;">启动系统和运行命令所需的共享文件和内核模块存放目录。分为 <code>/lib/</code> 和 <code>/lib64/（64位程序）</code> 。</td></tr> <tr><td style="text-align:center;">/media/</td> <td style="text-align:center;">media</td> <td style="text-align:left;">挂载目录。系统建议用来挂载媒体设备，如软盘和光盘。</td></tr> <tr><td style="text-align:center;">/mnt/</td> <td style="text-align:center;">mount</td> <td style="text-align:left;">挂载目录。早期 Linux 中只有这一个挂载目录，并没有细分。系统建议这个目录用来挂载额外的设备，如 U 盘、移动硬盘和其他操作系统的分区。</td></tr> <tr><td style="text-align:center;">/opt/</td> <td style="text-align:center;">optional application software package</td> <td style="text-align:left;">第三方安装的软件保存位置。如果是作为一个真正的运维，那么该目录基本上废弃了，推荐安装到 <code>/usr/local/</code> 下。在桌面端的 Linux 下还有一些应用会使用该目录。</td></tr> <tr><td style="text-align:center;">/proc/</td> <td style="text-align:center;">processes</td> <td style="text-align:left;">虚拟文件系统。该目录中的数据并不保存在硬盘上，而是保存到内存中。主要保存系统的内核、进程、外部设备状态和网络状态等。</td></tr> <tr><td style="text-align:center;">/root/</td> <td style="text-align:center;"></td> <td style="text-align:left;">root 用户的主目录。例如普通用户 shanyuhai 主目录为 <code>/home/shanyuhai</code> 下。</td></tr> <tr><td style="text-align:center;">/sbin/</td> <td style="text-align:center;">system binary</td> <td style="text-align:left;"><code>/sbin/</code> 的遭遇相对 <code>/bin/</code> 好一些，一些系统先关的指令只有在 <code>root</code> 用户下可以访问。</td></tr> <tr><td style="text-align:center;">/srv/</td> <td style="text-align:center;">service</td> <td style="text-align:left;">为系统提供服务数据目录。一些系统服务启动之后，可以在这个目录中保存所需要的数据。</td></tr> <tr><td style="text-align:center;">/tmp/</td> <td style="text-align:center;">temp</td> <td style="text-align:left;">临时目录。所有用户都可以访问和写入。</td></tr> <tr><td style="text-align:center;">/usr/</td> <td style="text-align:center;"><a href="https://www.zhihu.com/question/49073893/answer/616735594" target="_blank" rel="noopener noreferrer">Unix Software Resource<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></td> <td style="text-align:left;">用于存储系统软件资源。FHS 建议所有开发者，应把软件产品的数据合理的放置在 <code>/usr</code> 目录下的各子目录中，而不是为他们的产品创建单独的目录。</td></tr> <tr><td style="text-align:center;">/usr/bin/</td> <td style="text-align:center;"></td> <td style="text-align:left;">存放系统命令，普通用户和超级用户都可以执行。</td></tr> <tr><td style="text-align:center;">/usr/lib/</td> <td style="text-align:center;"></td> <td style="text-align:left;">应用程序调用的函数库保存位置。</td></tr> <tr><td style="text-align:center;">/usr/sbin/</td> <td style="text-align:center;"></td> <td style="text-align:left;">存放根文件系统不必要的系统管理命令，如多数服务程序，只有 root 可以使用。</td></tr> <tr><td style="text-align:center;">/usr/include/</td> <td style="text-align:center;"></td> <td style="text-align:left;"><code>C/C++</code> 等编程语言头文件的放置目录。</td></tr> <tr><td style="text-align:center;">/usr/share/</td> <td style="text-align:center;"></td> <td style="text-align:left;">应用程序的资源文件保存位置，如帮助文档、说明文档和字体目录。</td></tr> <tr><td style="text-align:center;">/usr/src/</td> <td style="text-align:center;"></td> <td style="text-align:left;">源码包保存位置。下载的源码包和内核源码包都可以保存到这里。</td></tr> <tr><td style="text-align:center;">/usr/X11R6/</td> <td style="text-align:center;"></td> <td style="text-align:left;">图形界面系统保存位置。</td></tr> <tr><td style="text-align:center;">/usr/local/</td> <td style="text-align:center;"></td> <td style="text-align:left;">手工安装的软件保存位置。一般建议源码包软件安装在这个位置。</td></tr> <tr><td style="text-align:center;">/var/</td> <td style="text-align:center;">variable data</td> <td style="text-align:left;">用于存储动态数据，例如缓存、日志文件、软件运行过程中产生的文件等。</td></tr> <tr><td style="text-align:center;">/var/cache/</td> <td style="text-align:center;"></td> <td style="text-align:left;">应用程序缓存数据。这些数据是在本地生成的一个耗时的 I/O 或计算结果。应用程序必须能够再生或恢复数据。缓存的文件可以被删除而不导致数据丢失。</td></tr> <tr><td style="text-align:center;">/var/lib/</td> <td style="text-align:center;"></td> <td style="text-align:left;">状态信息。程序运行中需要调用或改变的数据保存位置。</td></tr> <tr><td style="text-align:center;">/var/lock/</td> <td style="text-align:center;"></td> <td style="text-align:left;">锁文件，一类跟踪当前使用中资源的文件。</td></tr> <tr><td style="text-align:center;">/var/log/</td> <td style="text-align:center;"></td> <td style="text-align:left;">登陆文件放置的目录，其中所包含比较重要的文件如 <code>/var/log/messages</code>，<code>/var/log/wtmp</code> 等。</td></tr> <tr><td style="text-align:center;">/var/mail/</td> <td style="text-align:center;"></td> <td style="text-align:left;">用户的电子邮箱。</td></tr> <tr><td style="text-align:center;">/var/run/</td> <td style="text-align:center;"></td> <td style="text-align:left;">自最后一次启动以来运行中的系统的信息，例如：当前登录的用户和运行中的守护进程。现已经被 <code>/run</code> 代替。</td></tr> <tr><td style="text-align:center;">/var/spool/</td> <td style="text-align:center;"></td> <td style="text-align:left;">等待处理的任务的脱机文件，例如：打印队列和未读的邮件。</td></tr> <tr><td style="text-align:center;">/var/spool/mail/</td> <td style="text-align:center;"></td> <td style="text-align:left;">用户的邮箱（不推荐的存储位置）。</td></tr> <tr><td style="text-align:center;">/var/tmp/</td> <td style="text-align:center;"></td> <td style="text-align:left;">在系统重启过程中可以保留的临时文件。</td></tr> <tr><td style="text-align:center;">/run/</td> <td style="text-align:center;">run</td> <td style="text-align:left;">代替 <code>/var/run</code> 目录。</td></tr></tbody></table> <h2 id="非-fhs"><a href="#非-fhs" class="header-anchor">#</a> 非 FHS</h2> <table><thead><tr><th style="text-align:center;">缩写</th> <th style="text-align:center;">全称</th> <th>说明</th></tr></thead> <tbody><tr><td style="text-align:center;">/lost+found/</td> <td style="text-align:center;">lost + found</td> <td>当系统意外崩溃或意外关机时，产生的一些文件碎片会存放在这里。</td></tr> <tr><td style="text-align:center;">/sys/</td> <td style="text-align:center;">system</td> <td>虚拟文件系统。与 <code>/proc/</code> 目录类似（数据在内存中），主要用于保存与内核相关的信息，提供了比 <code>/proc/</code> 更为理想的访问内核数据的途径。</td></tr></tbody></table> <h2 id="硬件设备"><a href="#硬件设备" class="header-anchor">#</a> 硬件设备</h2> <p><a href="/os/linux/everything-is-a-file">Linux 中一切皆文件</a>。硬件设备自然也是文件，有各自的文件名称。Linux 系统内核中的 udev 设备管理器会自动对硬件设备的名称进行规范，目的是让用户通过设备文件的名称，就可以猜测设备的属性及相关信息。udev 设备管理器会一直以进程的形式运行，并侦听系统内核发出的信号来管理位于 <code>/dev</code> 目录下的设备文件。</p> <p>常见硬件设备文件名：</p> <table><thead><tr><th style="text-align:center;">硬件设备</th> <th style="text-align:center;">文件名称</th></tr></thead> <tbody><tr><td style="text-align:center;">IDE设备</td> <td style="text-align:center;">/dev/hd[a-d]，现在的 IDE设备已经很少见了，因此一般的硬盘设备会以 /dev/sd 开头。</td></tr> <tr><td style="text-align:center;">SCSI/SATA/U盘</td> <td style="text-align:center;">/dev/sd[a-p]，一台主机可以有多块硬盘，因此系统采用 a~p 代表 16 块不同的硬盘。</td></tr> <tr><td style="text-align:center;">m.2 硬盘</td> <td style="text-align:center;">/dev/nvme1n1p[1-9]</td></tr> <tr><td style="text-align:center;">软驱</td> <td style="text-align:center;">/dev/fd[0-1]</td></tr> <tr><td style="text-align:center;">打印机</td> <td style="text-align:center;">/dev/lp[0-15]</td></tr> <tr><td style="text-align:center;">光驱</td> <td style="text-align:center;">/dev/cdrom</td></tr> <tr><td style="text-align:center;">鼠标</td> <td style="text-align:center;">/dev/mouse</td></tr> <tr><td style="text-align:center;">磁带机</td> <td style="text-align:center;">/dev/st0 或 /dev/ht0</td></tr></tbody></table> <p>特殊设备文件：</p> <table><thead><tr><th>文件名</th> <th>说明</th> <th>作用</th></tr></thead> <tbody><tr><td><a href="/dev/null">/dev/null</a></td> <td>它丢弃一切写入其中的数据（但报告写入操作成功），读取它则会立即得到一个 EOF。</td> <td>通常被用于丢弃不需要的输出流，或作为输入流的空文件。</td></tr> <tr><td><a href="/dev/zero">/dev/zero</a></td> <td>当你读它的时候，他会提供无限的空字符串（NULL，0x00）。</td> <td>通常被用于提供字符流来覆盖信息，或利用它生成一个特定大小的空白文件。</td></tr></tbody></table></div> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2020年3月17日星期二下午2点47分</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/os/linux/detect-your-server.html" class="prev">
        检测服务器通达
      </a></span> <span class="next"><a href="/os/linux/firewalld.html">
        防火墙 firewalld
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"><!----><!----></div></div>
    <script src="/assets/js/app.1f0f93c9.js" defer></script><script src="/assets/js/2.f28f3227.js" defer></script><script src="/assets/js/103.872c594c.js" defer></script><script src="/assets/js/3.a7eaa85f.js" defer></script>
  </body>
</html>
